@extends('layouts.default')  
@section('content')
<div class="box primary">        
    <header>
        <div class="icons">
            <a href="{{ URL::to('create')}}"><i class="fa fa-plus" style="color:white;"></i></a>
        </div>
        <h5>Vehicle Specifications</h5>
        <!-- .toolbar -->
        <div class="toolbar">
            <nav style="padding: 8px;">
                <a href="javascript:;" class="btn btn-default btn-xs collapse-box">
                    <i class="fa fa-minus"></i>
                </a> 
                <a href="javascript:;" class="btn btn-default btn-xs full-box">
                    <i class="fa fa-expand"></i>
                </a> 
                <a href="javascript:;" class="btn btn-danger btn-xs close-box">
                    <i class="fa fa-times"></i>
                </a> 
            </nav>
        </div><!-- /.toolbar -->
    </header>
    <div id="div-1" class="body">   
        @foreach ($values as $v) 
        {{ Form::model($v, array('route' => array(
                        'car.update', $v->id),
                        'method' => 'PUT',
                        'class'=>'form-horizontal',
                        'id'=>'form-validate')) 
        }}
        <div class="form-group">
            {{ Form::label('startDate', Lang::get('messages.startDate').'*', array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('startDate', isset($v->startDate) ? $v->startDate : '' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('endDate', Lang::get('messages.endDate').'*', array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('endDate', isset($v->endDate) ? $v->endDate : '' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('pCityLocation', Lang::get('messages.pCityLocation'), array(
                            'class'=>'control-label col-lg-4'))
            }}
            <div class="col-lg-8">
                {{ Form::text('pCityLocation', isset($v->pCityLocation) ? $v->pCityLocation : '', array(                   
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.pCityLocation'))) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dCityLocation', Lang::get('messages.dCityLocation'), array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Form::text('pCityLocation', isset($v->dCityLocation) ? $v->dCityLocation : '', array(                   
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.dCityLocation'))) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('status', Lang::get('messages.status'), array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Form::text('status', isset($v->status) ? $v->status : '', array(                   
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.status'))) 
                }}
            </div>
        </div>
        <div class="form-group">
            @foreach ($cars as $c)
            {{ Form::label('make', Lang::get('messages.make'), array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Form::select('make',$cars, $c->id, array(
                                'class' => 'form-control'))
                }}

            </div>
            @endforeach
        </div>
        <div class="form-group">
            {{ Form::label('clientFirstName', Lang::get('messages.clientFirstName'), array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Form::text('clientFirstName', isset($v->clientFirstName) ? $v->clientFirstName : '', array(                   
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.clientFirstName'))) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('clientLastName', Lang::get('messages.clientLastName'), array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Form::text('clientLastName', isset($v->clientLastName) ? $v->clientLastName : '', array(                   
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.clientLastName'))) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('clientEmail', Lang::get('messages.clientEmail'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('clientEmail', isset($v->clientEmail) ? $v->clientEmail : '', array(                   
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.clientEmail'))) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('clientPhone', Lang::get('messages.clientPhone'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('clientPhone', isset($v->clientPhone) ? $v->clientPhone : '', array(                   
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.clientPhone'))) 
                }}
            </div>
        </div>
        {{ Form::submit(Lang::get('messages.save_btn'), array('class' => 'btn btn-primary btn-line')) }}
        <input type="button" value="{{Lang::get('messages.cancel_btn')}}" class="btn btn-danger btn-line" 
               onClick="history.go(-1);
                           return true;">
        {{ Form::close() }}
        @endforeach
    </div>
</div> 
@stop
